<!DOCTYPE html>
<html>
<head>
    <title></title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
			<#if shiro.hasPermission("baseinfo:lhpcard:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("baseinfo:lhpcard:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("baseinfo:lhpcard:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
					<div class="form-group">
                        <div class="col-sm-2 control-label">运营商</div>
                        <label class="radio-inline">
                            <input type="radio" name="cardType" value="1" v-model="lhpCard.cardType"/> 联通
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="cardType" value="2" v-model="lhpCard.cardType"/> 电信
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="cardType" value="3" v-model="lhpCard.cardType"/> 移动
                        </label>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">开卡号码</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="lhpCard.cardNumber" placeholder="开卡号码"/>
                        </div>
                    </div>
					<!--<div class="form-group">
                        <div class="col-sm-2 control-label">上网卡所在位置</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="lhpCard.cardPlace" placeholder="上网卡所在位置"/>
                        </div>
                    </div>-->
                    <div class="form-group">
                        <div class="col-sm-2 control-label">安装点</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="lhpCard.pointName" @click="pointTree" readonly="readonly" placeholder="安装点"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">流量总额</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="lhpCard.totalAmount" placeholder="流量总额"/>
                        </div>
                    </div>
					<!--<div class="form-group">
                        <div class="col-sm-2 control-label">开卡时间</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="openTime" v-model="lhpCard.openTime" placeholder="开卡时间">
                        </div>
                    </div>-->
					<div class="form-group">
                        <div class="col-sm-2 control-label">卡到期时间</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="endTime" v-model="lhpCard.endTime" placeholder="到期时间">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">状态</div>
                        <label class="radio-inline">
                            <input type="radio" name="isUse" value="0" v-model="lhpCard.isUse"/> 正常
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="isUse" value="1" v-model="lhpCard.isUse"/> 停机
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="isUse" value="2" v-model="lhpCard.isUse"/> 到期
                        </label>
                    </div>
					<!--<div class="form-group">
                        <div class="col-sm-2 control-label">代理商名称</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="lhpCard.agentName" placeholder="代理商名称"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">代理商电话</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="lhpCard.agentTel" placeholder="代理商电话"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label"></div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="lhpCard.desc1" placeholder=""/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label"></div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="lhpCard.desc2" placeholder=""/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label"></div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="lhpCard.desc3" placeholder=""/>
                        </div>
                    </div>-->
			<div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..." @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>
<!-- 选择安装点 -->
<div id="pointLayer" style="display: none;padding:10px;">
    <ul id="pointTree" class="ztree"></ul>
</div>
<script src="${request.contextPath}/statics/js/modules/baseinfo/lhpcard.js?_${.now?long}"></script>
<script src="${request.contextPath}/statics/plugins/layui2.5/layui.all.js?_${.now?long}"></script>
<script>
    layui.use('laydate', function() {
        var laydate = layui.laydate;
        laydate.render({
            elem: '#endTime'
        });
    })
</script>
</body>
</html>